package com.jintian.smart.kernel.flowable.component.action.base;

import com.jintian.smart.kernel.core.annotation.flow.FlowOperate;
import com.jintian.smart.kernel.core.flow.FlowAction;
import com.jintian.smart.kernel.core.flow.IFlowAction;
import com.jintian.smart.kernel.flowable.engine.BaseProcessService;
import org.springframework.transaction.annotation.Transactional;

public abstract class AbstractFlowAction<T> extends BaseProcessService implements IFlowAction<T> {
    @Override
    public FlowAction getAction() {
        return null;
    }

    @Override
    @Transactional
    @FlowOperate
    public T execute(String bizId, String bizClass, String process) throws Exception {
        return innerExecute(bizId, bizClass, process);
    }

    protected abstract T innerExecute(String bizId, String bizClass, String process) throws Exception;
}
